-- msg_trigger_dialog_stat
-- Create by huanghr
-- 触发对话记录数据

return function(lpc)
    local buffer = Buffer.create(lpc.trigger_dialog);

    local offset = 1;
    local id = 0;
    local size = Buffer.size(buffer);
    -- 对话是否已经出现过的数据
    local triggerDialogData = {};

    while (offset <= size) do
        -- 标记出现占一个字节
        local state = Buffer.getu8(buffer, offset);

        if TriggerDialogM.query(id) then
            triggerDialogData[id] = { ["state"] = state, }
        end

        -- 继续下一个monster
        id = id + 1;
        offset = offset + 1;
    end

    ME.user.dbase:set("trigger_dialog_stat", triggerDialogData);
end